package com.xujiang.imitationcompanypj.data.net;

import retrofit2.Retrofit;

/**
 * Created by xujiang on 2017/4/5.
 */

public class APRetrofitUtils {

    private static APRetrofitUtils retrofitUtils;

    private APRetrofitUtils(){

    }

    private static APRetrofitUtils get(){
        if(retrofitUtils == null){
            retrofitUtils = new APRetrofitUtils();
        }
        return retrofitUtils;
    }

    Retrofit mRetrofit;

    public void init(String baseUrl){
        mRetrofit = RetrofitUtils.get().getRetrofitBuilder().baseUrl(baseUrl).build();

    }

    /**
     * 空气净化器的Service服务初始化
     */
//    private AirPurificationService airPurificationService;
//    public AirPurificationService getAirPurificationService() {
//        if (airPurificationService == null) {
//            airPurificationService = getRetrofit().create(AirPurificationService.class);
//        }
//        return airPurificationService;
//    }
//    public Retrofit getRetrofit() {
//        return mRetrofit;
//    }

}
